package com.open.cloud.rbac.mapper.role;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.open.cloud.rbac.entity.permission.CorePermission;
import com.open.cloud.rbac.entity.role.CoreRolePermissionRel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 角色权限表 Mapper 接口
 * </p>
 *
 * @author wangzengzhou01
 * @since 2024-12-23
 */
@Mapper
public interface CoreRolePermissionRelMapper extends BaseMapper<CoreRolePermissionRel> {

    /**
     * 批量插入角色权限
     *
     * @param list
     * @return
     */
    public Integer batchInsertRolePermissionRel(@Param("list") List<CoreRolePermissionRel> list);

    /**
     * 批量删除角色权限
     *
     * @param roleId
     * @param permissionList
     * @return
     */
    public Integer deletePermissionMenuRel(@Param("roleId") String roleId,
                                           @Param("permissionList") List<CorePermission> permissionList);


}
